package com.qf.jie.dao.impl;

import com.qf.jie.dao.CommentDao;
import com.qf.jie.entity.po.Comment;
import com.qf.jie.utils.DBUtils;

import java.util.List;

public class CommentDaoImpl implements CommentDao {

    @Override
    public int addBean(Comment comment) {
        return DBUtils.excuteUpdate("insert into `comment`(user_id,text,commodity_id) values(?,?,?)",
                comment.getUser_id(), comment.getText(), comment.getCommodity_id()
                );
    }
    @Override
    public List<Comment> getListByCommodity_id(int id){
        return DBUtils.excuteQuery(Comment.class, "select * from comment where commodity_id=?", id);
    }

    @Override
    public int deleteById(int id) {
        return 0;
    }

    @Override
    public int updateById(Comment comment) {
        return 0;
    }

    @Override
    public int shamDeleteById(int id) {
        return 0;
    }

    @Override
    public int getCount() {
        return 0;
    }

    @Override
    public int getIdByName(String name) {
        return 0;
    }

    @Override
    public int getCountByName(String name) {
        return 0;
    }

    @Override
    public int getIdByNameAndPassword(String name, String password) {
        return 0;
    }

    @Override
    public List<Comment> getList() {
        return null;
    }

    @Override
    public List<Comment> getList(int start, int len) {
        return null;
    }

    @Override
    public List<Comment> getListLike(String name) {
        return null;
    }

    @Override
    public List<Comment> getBeanById(int id) {
        return null;
    }
}
